<?php
/**
 * $Author: genghonghao $
 * $Date: 2010-02-14 21:30:36 +0000 (Sun, 14 Feb 2010) $
 */

// 更新下载次数
function update_downloads() {
    global $count_file;
    $number = @file_get_contents($count_file);
    $number = intval($number) + 1;
    $handle = @fopen($count_file, 'a');
    @fwrite($handle, $number);
    @fclose($handle);
}
// 读取下载次数
function get_downloads() {
    global $count_file;
    $number = @file_get_contents($count_file);
    return intval($number);
}
?>